Repository navigation
Convert feature-travel-certificate to a Kotlin Multiplatform module - #3372
Closed
StylianosGakis wants to merge 2 commits into
Closed
StylianosGakis wants to merge 2 commits into
StylianosGakis wants to merge 2 commits into
Conversation
The module now builds for JVM and Android, with its keys, screens, presenters, ViewModels, use cases and deep link provider in commonMain. Email validation uses the commonMain isValidEmail, and the history and overview screens hand the downloaded PDF out as a DownloadedFile. java.util.Locale in the date input preview becomes previewCommonLocale, and the history preview reads today's date through kotlinx-datetime. The unused android.R.attr.enabled import is dropped. Unit tests run as jvmTest. TravelCertificateEntries stays in androidMain because sharing the PDF needs LocalContext and Context.sharePDF.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 AI description
Turns
feature-travel-certificateinto a Kotlin Multiplatform module (JVM and Android targets) with its keys, five ViewModels, presenters, use cases, deep links and screens incommonMain. Part of making the whole app run on a second platform (desktop). Nothing changes on Android.Stacked on #3368, which this PR targets, because the email check now calls the
commonMainisValidEmailfrom there.The first commit is 28 pure renames, including the unit tests moving to
jvmTestunchanged. In the second:DownloadedFileup instead of building ajava.io.File. The entries file builds theFilefrom the same path and hands it tosharePDFas before, which is why that one file stays inandroidMain.validateEmail(x).isSuccessfulbecomesisValidEmail(x), the same check. Error strings are unchanged.java.time.LocalDate.now()fully qualified and now usekotlinx.datetime.